home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / c01oop.zip / CPPWKBK / CPPV2-4.CPP < prev    next >
C/C++ Source or Header  |  1992-08-25  |  464b  |  26 lines

  1. #define HEADER "C++ Problem 2.4 by Rick Conn using Borland C++"
  2.  
  3. #include <stdio.h>
  4.  
  5. inline void print_plus_5 (int value)
  6. {
  7.   value += 5;
  8.   printf("The value plus 5 is %d\n", value);
  9. }
  10.  
  11. void main(void)
  12. {
  13.   printf("%s\n", HEADER);
  14.  
  15.   print_plus_5(2);
  16.   print_plus_5(-12);
  17.   print_plus_5(10);
  18.   print_plus_5(5);
  19.   print_plus_5(-5);
  20.   print_plus_5(-20);
  21.   print_plus_5(20);
  22.   print_plus_5(200);
  23.   print_plus_5(2000);
  24.   print_plus_5(20000);
  25. }
  26.